import request from "@/utils/request"

const perfix = "/common"


export const selectListofTeacher = () => {
  return request({
    url: `${perfix}/teacherList`,
    method: "get"
  })
}



/*
查看某个角色的权限列表
*/
export const toAssign = (roleId) => {
  return request({
    url: `menu/toAssign/${roleId}`,
    method: 'get'
  })
}

/*
给某个角色授权
*/
export const doAssign = (assginMenuVo) => {
  return request({
    url: `menu/doAssign`,
    method: "post",
    data: assginMenuVo
  })
}


// 获取所有班级用于查询
export const getClassList = (type, id) => {
  return request({
    url: `${perfix}/class?type=${type}&id=${id}`,
    method: "get"
  })
}

// 获取地址
export const getAddressList = () => {
  return request({
    url: `/city/tree`,
    method: 'get'
  })
}


// // 导出 excel
// export const exportOrder = (data) => {
//   return request({
//     url: `/excel/stu/exportOrder`,
//     method: 'get',
//     params: data,
//     responseType: 'blob'
//   })
// }


// /excel/stu/orderImportView 查看导入数据
export const showExcelList = (data) => {
  return request({
    url: `/excel/stu/orderImportView`,
    method: 'post',
    params: data
  })
}


// /excel/orderImport 
export const ImportExcel = (data) => {
  return request({
    url: `/excel/orderImport`,
    method: 'post',
    params: data
  })
}


// noApply
export const noApply = (data) => {
  return request({
    url: `/systemLog/noApply`,
    method: 'post',
    data
  })
}


// apply
export const apply = (data) => {
  return request({
    url: `/systemLog/apply`,
    method: 'post',
    data
  })
}